package com.rpc.protocol;

import com.alibaba.fastjson.JSON;

/**
 * @author yanzhuoleo
 * @version V1.0
 * @Description:
 * @date 2018-01-16-下午6:32
 */
public class JsonSerializeImpl implements ISerialize {
    @Override
    public byte[] serialize(Object transportData) {
        return JSON.toJSONBytes(transportData);
    }

    @Override
    public Object deserialize(byte[] data, Class objectClass) {
        return JSON.parseObject(data, objectClass);
    }

    public static void main(String[] args) {

    }

}
